guint button : 2;
guint child_has_focus : 1;
guint click_child : 3;
- guint during_detach : 1;
guint during_reorder : 1;
guint remove_in_detach : 1;
guint focus_out : 1; /* Flag used by ::move-focus-out implementation */
G_N_ELEMENTS (notebook_targets));
priv->operation = DRAG_OPERATION_NONE;
priv->detached_tab = NULL;
- priv->during_detach = FALSE;
priv->has_scrolled = FALSE;
if (gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL)
/* save press to possibly begin a drag */
if (page->reorderable || page->detachable)
{
- priv->during_detach = FALSE;
priv->during_reorder = FALSE;
priv->pressed_button = event->button;
notebook = GTK_NOTEBOOK (widget);
priv = notebook->priv;
- if (!priv->during_detach &&
+ if (priv->operation == DRAG_OPERATION_REORDER &&
priv->cur_page &&
priv->cur_page->reorderable &&
event->button == priv->pressed_button)
check_threshold (notebook, priv->mouse_x, priv->mouse_y))
{
priv->detached_tab = priv->cur_page;
- priv->during_detach = TRUE;
gtk_drag_begin_with_coordinates (widget, priv->source_targets, GDK_ACTION_MOVE,
priv->pressed_button, (GdkEvent*) event,